package com.prp.db.idao;

import java.util.HashMap;
import java.util.List;

import com.prp.db.po.UserInformation;

public interface IUserInformationDAO {
	public void save(UserInformation transientInstance);

	public void delete(UserInformation persistentInstance);

	public UserInformation findById(java.lang.Integer id);

	public List findByExample(UserInformation instance);

	public List findByProperty(String propertyName, Object value);
	
	public List findByCommunityId(Integer comId);

	public List findByUserRegName(Object userRegName);

	public List findByUserRealName(Object userRealName);

	public List findByGender(Object gender);

	public List findByAge(Object age);

	public List findByEmail(Object email);

	public List findByPassword(Object password);

	public List findByPictureRoutine(Object pictureRoutine);

	public List findByIdentity(Object identity);

	public List findAll();

	public UserInformation merge(UserInformation detachedInstance);

	public void attachDirty(UserInformation instance);

	public void attachClean(UserInformation instance);

	/**
	 * we use this method to get all community ids and the number of user in each community.
	 */
	public int getCommunitySize(int community_id);
	
	public List<String> findStringByEmailPattern(String query);
	
	public List<String> findStringByNamePattern(String query);
	
	public List<UserInformation> findByNamePattern(String query);
	public List<UserInformation> findByUserNamePattern(String query);
	
	public List findByActivated(boolean activated);
}
